<%@include file="../common.jsp" %>

<div>
	<c:choose>
		<c:when test="${fn:length(companyMap) > 0}">
			<form name="delCompany" id="delCompany">
				<table class="viewDetails">
					<tr class="heading">
						<td colspan="5" align="center">List Of Companies</td>
					</tr>
					<tr class="even">
						<td></td>
						<!-- <td> <b> Company Id </b> </td>	 -->
						<td> <b> Name </b> </td>
						<td> <b> Code </b> </td>
						<td> <b> Address </b> </td>
					</tr>	
				
					<c:forEach items="${companyMap}" var="companysMap" varStatus="loop">
					
						<c:set var="tabColor" value="odd"></c:set>
				     	<c:if test="${(loop.index % 2) eq 0}">
				        	<c:set var="tabColor" value="even"></c:set>
				        </c:if>
				    <tr class="${tabColor}">
				    	<td align="center"> <input type="radio" id="radio${index.index}" name="radio" value="${companysMap.value.cdId}"/> </td>
						<%-- <td> ${companysMap.value.cdId} </td> --%>
						<td> ${companysMap.value.cdName} </td>
						<td> ${companysMap.value.cdCode} </td>
						<td> ${companysMap.value.address} ${companysMap.value.cdCity}  ${companysMap.value.cdDistrict}  ${companysMap.value.cdState} </td>
					</tr>	
					</c:forEach>	
				</table>
					<input type="button" value="Select" onclick="submitCompanyDetailsTodel();" />
			</form>
		
			
			<c:if test="${resultOfDel}">
				Operation Done Successfully.
			</c:if>
		</c:when>
		<c:otherwise>
			No Records Found
		</c:otherwise>
	</c:choose>
</div>